require.config({
               baseUrl:"../",
               paths:{
               bsl:'bsl',
               
               }
               });


require(['bsl'],function(bsl){
        document.addEventListener('deviceready', onDeviceready, false);
        function onDeviceready(){
        alert('receivedEvent');
        // console.log('receivedEvent!');
        function closeView(){
        var storage = window.localStorage;
        var showAni = storage.getItem("ani");
        var closeAnis = {
        "slide-in-top":"slide-out-top",
        "slide-in-right":"slide-out-right",
        "slide-in-left":"slide-out-left",
        "slide-in-bottom":"slide-out-bottom",
        "zoom-out":"zoom-in",
        "fade-in":"fade-out",
        "zoom-fade-out":"zoom-fade-in",
        "none":"none",
        };
        var closeAni = closeAnis[showAni];
        bsl.webview.close("webView1",closeAni,400);
        };
        
        var windowBtn = document.getElementById("close");
        windowBtn.onclick = closeView;

        }
});